﻿#include "FTableWidget.h"
#include "../Base/FTheme.h"


FTableWidget::FTableWidget(QWidget *parent)
    : QTableWidget{parent}
{
    QString qss = QString(R"(
QHeaderView::section {
    background-color: transparent;
    font-weight: bold;
    border: 1px solid %1;
    border-right: none;
    text-align: center;
}
FTableWidget {
    background: transparent;
    alternate-background-color: %2;
    border: 1px solid %1;
    border-top: none;
    selection-color: black;
    outline: none;
}
FTableWidget::item {
    border: 1px solid %1;
    border-right: none;
    border-top: none;
}
FTableWidget::item:hover {
    background: transparent;
}
FTableWidget::item:focus {
    border: none;
    background: transparent;
}
)").arg(FColors::getBaseColor(FColors::Default).name(QColor::HexArgb),
        FColors::getBackgroundColor().name(QColor::HexArgb));

    setStyleSheet(qss);
}
